home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / Recent1 / AmIRCPing.lha / ping.amirx < prev   
Text File  |  1997-03-18  |  2KB  |  69 lines

  1. /* Ping script for use with AmIRC 1.x */ Version = '1.04' /*
  2. // Written by Deryk Robosson 3.1.96
  3. //
  4. // newlook@ameritech.net newlook on #amiga IRC (EfNet)
  5. //
  6. // 02.02.97 (1.01) - Added flood support to script
  7. //                   as well as just passing it a user nick.
  8. // 04.03.97 (1.02) - Prettied up the display of information
  9. // 07.03.97        - Corrected typeo in the .readme file
  10. // 09.03.97 (1.03) - Corrected HELP info for flood template
  11. // 18.03.97 (1.04) - cleaned up the code
  12. */
  13. /* set your ping count here */
  14. count = 5
  15.  
  16. bold = d2c(2)
  17. underline = '1F'x
  18.  
  19. options results
  20. parse arg param
  21.  
  22. param = trim(upper(param))
  23. if param = ''|param='VER' then signal version
  24. if param = 'HELP' then signal help
  25.  
  26. if param ~= '' then do
  27.     parse var param site' 'command
  28.     if site ~= '' then site = strip(upper(site))
  29.     else site=''
  30.     if command ~= '' then command=strip(upper(command))
  31.     else command = ''
  32. end
  33.  
  34. 'USERHOST 'site
  35. if result ~= 'RESULT' then parse var result user'@'site
  36.  
  37. /* prepare for the main file */
  38. con = 'con:0/0/600/100/PingOutput/CLOSE/SIMPLEREFRESH'
  39.  
  40. /* switch on our parameters */
  41. if command = '' then ping = 'amitcp:bin/ping -c' count||' '||site '>' con
  42. else if command = 'FLOOD' then ping = 'amitcp:bin/ping -f' site ' >' con
  43.  
  44. ADDRESS COMMAND ping
  45. EXIT
  46.  
  47. version:    /* show the user version information */
  48.     call echo(bold'Ping.AMIRX'bold' Version 'bold||version)
  49.     call echo('Read the top of Ping.AMIRX script for history.')
  50.     call echo(bold'©1996,1997'bold' Deryk Robosson 'bold'(newlook)'bold' - [newlook@ameritech.net]')
  51.     call echo('Type /<alias> help for command information')
  52. exit
  53.  
  54. help:   /* show the user help examples */
  55.     call echo(bold'Ping.AMIRX'bold' Help')
  56.     call echo(bold'VER - 'bold'displays script version')
  57.     call echo(bold'FLOOD - 'bold'selects ping flood')
  58.     call echo(bold'HELP - 'bold'displays this file')
  59.     call echo(bold||underline'EXAMPLES:'bold||underline)
  60.     call echo(bold'/Pi site.com 'bold' will ping a site')
  61.     call echo(bold'/Pi usernick 'bold' will ping the users site')
  62.     call echo(bold'/Pi site.com FLOOD 'bold' will flood the site')
  63. exit
  64.  
  65. echo: procedure
  66.     parse arg a
  67.     'echo P='d2c(27)'b«Ping» 'a
  68. return 1
  69.